package com.mall.controller;

import com.mall.pojo.UmsResourceCategory;
import com.mall.service.UmsResourceCategoryService;
import com.mall.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/resourceCategory")
public class UmsResourceCategoryController {
    @Autowired
    private UmsResourceCategoryService umsResourceCategoryService;

    //查询所有后台资源分类
    @GetMapping("/listAll")
    public Result<List<UmsResourceCategory>> listAll() {
        List<UmsResourceCategory> list = umsResourceCategoryService.listAll();
        return Result.success(list, "操作成功");
    }

}
